package com.dxx.cloud.admin.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.dxx.cloud.admin.module.entity.OrderDetailEntity;
import com.dxx.cloud.admin.module.entity.OrdersEntity;
import com.dxx.cloud.admin.module.request.OrderLatestRequest;
import com.dxx.cloud.admin.module.request.OrderPageListRequest;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 销售单表 Mapper 接口
 * </p>
 *
 * @author dh
 * @since 2025-06-06
 */
public interface OrdersMapper extends BaseMapper<OrdersEntity> {

    Page<OrdersEntity> selectOrderRepayedPage(Page<OrdersEntity> pageModel, OrderPageListRequest request);

    Page<OrdersEntity> selectOrderRepayedPageWithLike(Page<OrdersEntity> pageModel, OrderPageListRequest request);

    Page<OrdersEntity> selectOrderPage(Page<OrdersEntity> pageModel, OrderPageListRequest request);

    Page<OrdersEntity> selectOrderPageWithLike(Page<OrdersEntity> pageModel, OrderPageListRequest request);

    OrdersEntity latestOrderSerialNo(OrderLatestRequest request);

    List<OrderDetailEntity> listOrderDetailByOrderId(Long orderId);
}
